// pages/setDetail/setDetail.js
Page({

  data: {
    
  },
  showModal(e){
    this.setData({
      modalName: e.currentTarget.dataset.target
    })
  },
  hideModal(e){
    this.setData({
      modalName: null
    })
  },
  onShow(){
    let user = wx.getStorageSync('userInfo')
    this.setData({
      user:user
    })
  },
  loginOut(){
    wx.removeStorageSync('userInfo')
    wx.switchTab({
      url: '/pages/my/my',
    })
    this.hideModal()
  },
  toLogin(){
    wx.navigateTo({
      url: '/pages/login/login',
    })
  }
})